MediaMonkey offers scripting support, providing a powerful way to enhance its functionality. Scripts can be created by anyone who is moderately technically proficient, and installed by any user.
To add custom functionality:
The scripts used by MediaMonkey are compatible with the Windows Scripting Host, meaning that you can use any language supported by this host, although most users use VBScript. Simply create a script (e.g. Newscript.vbs) and save it to /Program Files/MediaMonkey/Scripts/ .
In order to work with MediaMonkeyÆs objects from your scripts, an æSDBÆ object is always available allowing you to access its properties and methods. If you wish to access MediaMonkey's scripting functions from outside of MediaMonkey, (e.g. via an ASP page), you can create this object with the following code:
Dim SDB
Set SDB = CreateObject( "MediaMonkey.SDBApplication")
Note: ôMediaMonkey init.vbsö file is always executed before your script and therefore contains some constants that may be used afterwards within your script.
More information about the properties and methods of the SDB object and related objects, along with sample code can be found in MediaMonkeyScripting.chm. A good and fairly complex example of a script is Export.vbs (distributed with MediaMonkey) which contains code responsible for MediaMonkey's export/reporting functionality.
Edit the C:\Program Files\MediaMonkey\Scripts\Scripts.ini file to include information about the newly created script. This file is a standard .ini file where each section defines one custom script. Each section contains the following information:
[SectionName], appears first, where æSectionNameÆ is a unique identifier
for the script.
Filename= Name of a file where the script is located, e.g.
æMyScripts.vbsÆ.
ProcName= Name of a procedure to be called when the script
is executed in MM. This procedure must exist in the æFilenameÆ specified
above.
ScriptType= Defines type of the script:
Order= Defines the order of the script in its section. These numbers are
sorted and scripts are listed within their associated menu in according to
their order.
DisplayName= The script is listed under this name in
MediaMonkey menu.
Description= This is shown as a tooltip when mouse is
over the script's menu entry.
Language= Is usually VBScript, but can be any
other scripting language, e.g. JScript.
Shortcut= Can specify a shortcut
that will invoke the script in MM. You can use any of the string æShift+Æ,
æCtrl+Æ or æAlt+Æ even combined together and followed either by a single
letter or by a special key, which are: BkSp, Tab, Enter, Esc, Space, PgUp,
PgDn, End, Home, Left, Up, Right, Down, Ins, Del.
Related Information:
See the MediaMonkey Scripts web site to download scripts
See the MediaMonkey Development Forum for more information about scripts and components
See Windows Scripting for more information about scripting in general (e.g. VBScript and JScript)